package com.wangjie.exception;

import com.wangjie.response.ResultCode;

/**
 * @author jieshao
 * @date 2021/10/15 11:37
 */
public class CustomException extends RuntimeException {
    /**
     * 错误代码
     */
    private ResultCode resultCode;

    public CustomException(ResultCode resultCode) {
        super("错误代码:" + resultCode.code() + "错误信息:" + resultCode.message());
        this.resultCode = resultCode;
    }

    public ResultCode getResultCode() {
        return this.resultCode;
    }
}